package com.jiuqian.demo.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.jiuqian.common.core.Result;
import com.jiuqian.common.core.base.BaseController;
import com.jiuqian.demo.model.SysUser;
import com.jiuqian.demo.service.SysUserService;

@RestController
public class SysUserController extends BaseController {
	
	@Autowired
	private SysUserService userService;

	@GetMapping({ "/sys/user/{id}" })
	public Result<SysUser> findById(@PathVariable("id") Integer id) {
		return response(this.userService.findById(id));
	}
}
